import WebpackIconfontPluginNodejs from 'webpack-iconfont-plugin-nodejs'
import { join } from 'path'

const dir = 'src/assets/'
const name = 'icon'

new WebpackIconfontPluginNodejs({
  fontName: name,
  cssPrefix: name,
  svgs: join(dir, 'svgs/*.svg'),
  fontsOutput: join(dir, 'scss/iconfont/'),
  cssOutput: join(dir, 'scss/iconfont/' + name + '.scss'),
  htmlOutput: false,
  formats: ['ttf', 'woff']
}).build()
